<?php
//模型
class MemberPhysicalTypeModel extends MY_Model {
	function __construct(){
		parent::__construct();
		$this->table = 'user_physical_type';
	}
	
	function get_list(){
		
		
		$sql  = "select * from ".$this->db->dbprefix.$this->table." where user_id='{$uid}' AND `type` ='{$type}' limit 100";

		$query = $this->db->query($sql);
		$res = $query->result_array();
		
		return $res;
	}
	
	function pos_get_info($uid,$type=0,$pos){
		$sql  = "select * from ".$this->db->dbprefix.$this->table." where user_id='{$uid}' AND `type` ='{$type}' AND `position`='{$pos}' limit 1";

		$query = $this->db->query($sql);
		$row = $query->row_array();
		
		if(!$row){
			return false;
		}
		
		return $row;
	}
}

